package main.interaction
{
	public class State
	{
		
		public var name:String;
		public var camera:String;
		
		public var interactiveObjects:Array = [];
		public var interactiveRegions:Array = [];
		
		public function State()
		{
		}
		
		
		public static function fromXML(xml:XML):State {
			var state:State = new State();
			state.name = xml.@name;
			state.camera = xml.@camera;
			var x:XML;
			for each(x in xml.interactiveObject) {
				state.interactiveObjects.push(InteractiveObject.fromXML(x));
			}
			for each(x in xml.screenRegion) {
				state.interactiveRegions.push(InteractiveRegion.fromXML(x));
			}
			return state;
		}

	}
}